using System;
using System.Collections;
using System.IO;
using Rdl;

namespace GTame.ReportParser
{

    public class Report
    {

        private string _Author;
        private System.Nullable<uint> _AutoRefresh;
        private GTame.ReportParser.BodyType _Body;
        private string _BottomMargin;
        private GTame.ReportParser.ClassesType _Classes;
        private string _Code;
        private GTame.ReportParser.CodeModulesType _CodeModules;
        private GTame.ReportParser.CustomPropertiesType _CustomProperties;
        private string _DataElementName;
        private Rdl.ReportDataElementStyle _DataElementStyle;
        private string _DataSchema;
        private GTame.ReportParser.DataSetsType _DataSets;
        private GTame.ReportParser.DataSourcesType _DataSources;
        private string _DataTransform;
        private string _Description;
        private GTame.ReportParser.EmbeddedImagesType _EmbeddedImages;
        private string _InteractiveHeight;
        private string _InteractiveWidth;
        private string _Language;
        private string _LeftMargin;
        private GTame.ReportParser.PageHeaderFooterType _PageFooter;
        private GTame.ReportParser.PageHeaderFooterType _PageHeader;
        private string _PageHeight;
        private string _PageWidth;
        private GTame.ReportParser.ReportParametersType _ReportParameters;
        private string _RightMargin;
        private string _TopMargin;
        private string _Width;

        public string Author
        {
            get
            {
                return _Author;
            }
            set
            {
                _Author = value;
            }
        }

        public System.Nullable<uint> AutoRefresh
        {
            get
            {
                return _AutoRefresh;
            }
            set
            {
                _AutoRefresh = value;
            }
        }

        public GTame.ReportParser.BodyType Body
        {
            get
            {
                if (_Body == null)
                    _Body = new GTame.ReportParser.BodyType();
                return _Body;
            }
            set
            {
                _Body = value;
            }
        }

        public string BottomMargin
        {
            get
            {
                return _BottomMargin;
            }
            set
            {
                _BottomMargin = value;
            }
        }

        public GTame.ReportParser.ClassesType Classes
        {
            get
            {
                if (_Classes == null)
                    _Classes = new GTame.ReportParser.ClassesType();
                return _Classes;
            }
            set
            {
                _Classes = value;
            }
        }

        public string Code
        {
            get
            {
                return _Code;
            }
            set
            {
                _Code = value;
            }
        }

        public GTame.ReportParser.CodeModulesType CodeModules
        {
            get
            {
                if (_CodeModules == null)
                    _CodeModules = new GTame.ReportParser.CodeModulesType();
                return _CodeModules;
            }
            set
            {
                _CodeModules = value;
            }
        }

        public GTame.ReportParser.CustomPropertiesType CustomProperties
        {
            get
            {
                if (_CustomProperties == null)
                    _CustomProperties = new GTame.ReportParser.CustomPropertiesType();
                return _CustomProperties;
            }
            set
            {
                _CustomProperties = value;
            }
        }

        public string DataElementName
        {
            get
            {
                return _DataElementName;
            }
            set
            {
                _DataElementName = value;
            }
        }

        public Rdl.ReportDataElementStyle DataElementStyle
        {
            get
            {
                return _DataElementStyle;
            }
            set
            {
                _DataElementStyle = value;
            }
        }

        public string DataSchema
        {
            get
            {
                return _DataSchema;
            }
            set
            {
                _DataSchema = value;
            }
        }

        public GTame.ReportParser.DataSetsType DataSets
        {
            get
            {
                if (_DataSets == null)
                    _DataSets = new GTame.ReportParser.DataSetsType();
                return _DataSets;
            }
            set
            {
                _DataSets = value;
            }
        }

        public GTame.ReportParser.DataSourcesType DataSources
        {
            get
            {
                if (_DataSources == null)
                    _DataSources = new GTame.ReportParser.DataSourcesType();
                return _DataSources;
            }
            set
            {
                _DataSources = value;
            }
        }

        public string DataTransform
        {
            get
            {
                return _DataTransform;
            }
            set
            {
                _DataTransform = value;
            }
        }

        public string Description
        {
            get
            {
                return _Description;
            }
            set
            {
                _Description = value;
            }
        }

        public GTame.ReportParser.EmbeddedImagesType EmbeddedImages
        {
            get
            {
                if (_EmbeddedImages == null)
                    _EmbeddedImages = new GTame.ReportParser.EmbeddedImagesType();
                return _EmbeddedImages;
            }
            set
            {
                _EmbeddedImages = value;
            }
        }

        public string InteractiveHeight
        {
            get
            {
                return _InteractiveHeight;
            }
            set
            {
                _InteractiveHeight = value;
            }
        }

        public string InteractiveWidth
        {
            get
            {
                return _InteractiveWidth;
            }
            set
            {
                _InteractiveWidth = value;
            }
        }

        public string Language
        {
            get
            {
                return _Language;
            }
            set
            {
                _Language = value;
            }
        }

        public string LeftMargin
        {
            get
            {
                return _LeftMargin;
            }
            set
            {
                _LeftMargin = value;
            }
        }

        public GTame.ReportParser.PageHeaderFooterType PageFooter
        {
            get
            {
                if (_PageFooter == null)
                    _PageFooter = new GTame.ReportParser.PageHeaderFooterType();
                return _PageFooter;
            }
            set
            {
                _PageFooter = value;
            }
        }

        public GTame.ReportParser.PageHeaderFooterType PageHeader
        {
            get
            {
                if (_PageHeader == null)
                    _PageHeader = new GTame.ReportParser.PageHeaderFooterType();
                return _PageHeader;
            }
            set
            {
                _PageHeader = value;
            }
        }

        public string PageHeight
        {
            get
            {
                return _PageHeight;
            }
            set
            {
                _PageHeight = value;
            }
        }

        public string PageWidth
        {
            get
            {
                return _PageWidth;
            }
            set
            {
                _PageWidth = value;
            }
        }

        public GTame.ReportParser.ReportParametersType ReportParameters
        {
            get
            {
                if (_ReportParameters == null)
                    _ReportParameters = new GTame.ReportParser.ReportParametersType();
                return _ReportParameters;
            }
            set
            {
                _ReportParameters = value;
            }
        }

        public string RightMargin
        {
            get
            {
                return _RightMargin;
            }
            set
            {
                _RightMargin = value;
            }
        }

        public string TopMargin
        {
            get
            {
                return _TopMargin;
            }
            set
            {
                _TopMargin = value;
            }
        }

        public string Width
        {
            get
            {
                return _Width;
            }
            set
            {
                _Width = value;
            }
        }

        public Report()
        {
            _AutoRefresh = new System.Nullable<uint>[]();
            _DataElementStyle = Rdl.ReportDataElementStyle.ElementNormal;
        }

        public System.IO.MemoryStream GetStream()
        {
            // trial
            return null;
        }

        public Rdl.Report Write()
        {
            Rdl.Report report = new Rdl.Report();
            System.Collections.ArrayList arrayList1 = new System.Collections.ArrayList();
            System.Collections.ArrayList arrayList2 = new System.Collections.ArrayList();
            if (_Author != null)
            {
                arrayList1.Add(_Author);
                arrayList2.Add(1);
            }
            if (_AutoRefresh.get_HasValue())
            {
                arrayList1.Add(_AutoRefresh);
                arrayList2.Add(2);
            }
            if (_Body != null)
            {
                arrayList1.Add(_Body.Write());
                arrayList2.Add(3);
            }
            if (_BottomMargin != null)
            {
                arrayList1.Add(_BottomMargin);
                arrayList2.Add(4);
            }
            if (_Classes != null)
            {
                arrayList1.Add(_Classes.Write());
                arrayList2.Add(5);
            }
            if (_Code != null)
            {
                arrayList1.Add(_Code);
                arrayList2.Add(6);
            }
            if (_CodeModules != null)
            {
                arrayList1.Add(_CodeModules.Write());
                arrayList2.Add(7);
            }
            if (_CustomProperties != null)
            {
                arrayList1.Add(_CustomProperties.Write());
                arrayList2.Add(8);
            }
            if (_DataElementName != null)
            {
                arrayList1.Add(_DataElementName);
                arrayList2.Add(9);
            }
            arrayList1.Add(_DataElementStyle);
            arrayList2.Add(10);
            if (_DataSchema != null)
            {
                arrayList1.Add(_DataSchema);
                arrayList2.Add(11);
            }
            if (_DataSets != null)
            {
                arrayList1.Add(_DataSets.Write());
                arrayList2.Add(12);
            }
            if (_DataSources != null)
            {
                arrayList1.Add(_DataSources.Write());
                arrayList2.Add(13);
            }
            if (_DataTransform != null)
            {
                arrayList1.Add(_DataTransform);
                arrayList2.Add(14);
            }
            if (_Description != null)
            {
                arrayList1.Add(_Description);
                arrayList2.Add(15);
            }
            if (_EmbeddedImages != null)
            {
                arrayList1.Add(_EmbeddedImages.Write());
                arrayList2.Add(16);
            }
            if (_InteractiveHeight != null)
            {
                arrayList1.Add(_InteractiveHeight);
                arrayList2.Add(17);
            }
            if (_InteractiveWidth != null)
            {
                arrayList1.Add(_InteractiveWidth);
                arrayList2.Add(18);
            }
            if (_Language != null)
            {
                arrayList1.Add(_Language);
                arrayList2.Add(19);
            }
            if (_LeftMargin != null)
            {
                arrayList1.Add(_LeftMargin);
                arrayList2.Add(20);
            }
            if (_PageFooter != null)
            {
                arrayList1.Add(_PageFooter.Write());
                arrayList2.Add(21);
            }
            if (_PageHeader != null)
            {
                arrayList1.Add(_PageHeader.Write());
                arrayList2.Add(22);
            }
            if (_PageHeight != null)
            {
                arrayList1.Add(_PageHeight);
                arrayList2.Add(23);
            }
            if (_PageWidth != null)
            {
                arrayList1.Add(_PageWidth);
                arrayList2.Add(24);
            }
            if (_ReportParameters != null)
            {
                arrayList1.Add(_ReportParameters.Write());
                arrayList2.Add(25);
            }
            if (_RightMargin != null)
            {
                arrayList1.Add(_RightMargin);
                arrayList2.Add(26);
            }
            if (_TopMargin != null)
            {
                arrayList1.Add(_TopMargin);
                arrayList2.Add(27);
            }
            if (_Width != null)
            {
                arrayList1.Add(_Width);
                arrayList2.Add(28);
            }
            report.Items = arrayList1.ToArray();
            report.ItemsElementName = (Rdl.ItemsChoiceType37[])arrayList2.ToArray(typeof(Rdl.ItemsChoiceType37));
            arrayList2 = arrayList1 = null;
            return report;
        }

    } // class Report

}

